% Licensed under the Apache License, Version 2.0 (the "License"); you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
%   http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
% License for the specific language governing permissions and limitations under
% the License.
-module(test_utils).

%% Include files
-include_lib("eunit/include/eunit.hrl").

add_trailing_slash_1_test() ->
	"foo/" = nimbula_utils:add_trailing_slash("foo/").

add_trailing_slash_2_test() ->
	"foo/" = nimbula_utils:add_trailing_slash("foo").

remove_trailing_slash_1_test() ->
	"bar" = nimbula_utils:remove_trailing_slash("bar").
	
remove_trailing_slash_2_test() ->
	"bar" = nimbula_utils:remove_trailing_slash("bar/").
	
remove_leading_slash_1_test() ->
	"bar/" = nimbula_utils:remove_leading_slash("bar/").
	
remove_leading_slash_2_test() ->
	"bar/" = nimbula_utils:remove_leading_slash("/bar/").

remove_slashes_test() ->
	"baz" =nimbula_utils:remove_slashes("/baz/").

to_string_1_test() ->
	"foobar" = nimbula_utils:to_string("foobar").

to_string_2_test() ->
	"foobar" = nimbula_utils:to_string(<<"foobar">>).
